package com.usermanage.Mapping;

import com.usermanage.beanParam.GroupPermissionBean;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by  on 2018/9/3
 */
@Repository("groupPermissionMapping")
public interface GroupPermissionMapping extends JpaRepository<GroupPermissionBean, Integer> {

    @Query(value = "SELECT ugp.permission_id FROM u_group ug LEFT JOIN u_group_permission ugp ON ug.id = ugp.group_id WHERE ug.group_type = '44' ",nativeQuery = true)
    List<Integer> getBasePermission();
}
